package com.cj.webapp.account.controller;

import com.cj.webapp.account.dao.HangDao;
import com.cj.webapp.account.pojo.ProHangDto;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 *
 * 会员开户
 * Created by dell on 2017/12/25.
 */

//@WebServlet(name = "AccountServlet",urlPatterns ={"/account"})
public class AccountServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	response.setContentType("text/html;charset=utf-8");
    	response.setCharacterEncoding("utf-8");
        String id=request.getParameter("id");
        HangDao hangDao=new HangDao();
        List<ProHangDto> list = hangDao.getProHangByHangId(id);
        response.getWriter().print(list.toString());
    }
    
}
